Add fetch for tenant config and write context file#314
Add fetch for tenant config and write context file#314timothyF95 wants to merge 11 commits intomainfrom
Conversation
internal/tenantctx/tenantctx.go
Outdated
| case "OWNER_KEY_SIGNING": | ||
| flows = append(flows, "owner-key-signing") | ||
| default: | ||
| flows = append(flows, strings.ToLower(f)) |
There was a problem hiding this comment.
Shouldn't we raise an error in this case?
There was a problem hiding this comment.
I don't want to raise an error at this point because it could cause a failure while we are still developing the feature. I have added a debug log
| } | ||
|
|
||
| // EnsureContext guarantees the registry manifest exists for the current environment. | ||
| // API key users always fetch fresh; bearer token users use the cached file from login. |
There was a problem hiding this comment.
What if the JWT expires, do we need to refetch?
There was a problem hiding this comment.
If the JWT has expired the refresh token will automatically request another one. If the refresh token has expired the auth package will prompt the user to log in again which will refresh the context
| }{ | ||
| {"0xaE55eB3EDAc48a1163EE2cbb1205bE1e90Ea1135", "0xaE55...1135"}, | ||
| {"0x12345678", "0x12345678"}, // 10 chars, no abbreviation | ||
| {"short", "short"}, |
There was a problem hiding this comment.
Does this test case make sense? short is not a valid ETH address
There was a problem hiding this comment.
Yes, we are not yet certain on the label and it may change in the future so I think it would be good to cater for man cases
JIRA
https://smartcontract-it.atlassian.net/browse/DEVSVCS-4354